<?php
	require_once __DIR__."/../Models/projects.php";
	
	use Symfony\Component\HttpFoundation\Request;
	use Symfony\Component\HttpFoundation\Response;

	$projects_model = new Models\Projects($app);
	$projects = $app['controllers_factory'];

	$projects->get('/', function() use ($app, $projects_model) {
		$prjs = $projects_model->getAll();
		return $app['twig']->render( 'projects.html', array('picss'=>$prjs) );
	});

	return $projects; 
?>